package org.example.flink.code;

import org.apache.flink.api.common.typeinfo.TypeHint;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.common.typeinfo.Types;
import org.apache.flink.api.java.tuple.Tuple;
import org.apache.flink.api.java.tuple.Tuple2;

/**
 * @Description :
 * @School:优极限学堂
 * @Official-Website: http://www.yjxxt.com
 * @Teacher:李毅大帝
 * @Mail:863159469@qq.com
 */
public class Hello08TypeInformationCreate {
    public static void main(String[] args) {
        //第一种方式
        TypeInformation<String> of = TypeInformation.of(String.class);

        //第二种方式
        TypeInformation<Tuple2<String, Long>> info = TypeInformation.of(new TypeHint<Tuple2<String, Long>>() {
        });

        //第三种方式
        TypeInformation<String> string = Types.STRING;
        TypeInformation<Tuple> tuple = Types.TUPLE(Types.STRING, Types.LONG);
    }
}

